package com.ymatou.iapi.optrade.service;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

public class BatchValidateRefundV2Call extends YmatouBaseCall {
	
	private static String opurl = "api/batchValidateRefundV2";

	public BatchValidateRefundV2Call() {
		super(EnvSetup.getSystemUrl("operate2_iapi"), opurl, "POST", "JSON");
	}

	@Override
	public void addDefHeader() {
		client.addHeader("Accept",
				"text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	//
	public JSONArray getMaxCanRefundAmountVos() {
		JSONArray data = null;
		try {
			data = new JSONObject(getReturnData()).getJSONArray("maxCanRefundAmountVos");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return data;
	}
}
